package command;

import java.util.Date;

import domain.Gender;
import domain.MaritalStatus;
import domain.Profile;
import domain.User;

public class BasicInfoForm {
	private String name;
	
	private String lastName;
	
	private Date birthdate;
	
	private MaritalStatus maritalStatus;

	private Gender gender;
	
	public BasicInfoForm() {
		
	}
	
	public BasicInfoForm(User user){
		Profile p = user.getProfile();
		
		this.name=user.getName();
		this.lastName=user.getLastName();
		this.birthdate = p.getBirthdate();
		this.maritalStatus = p.getMaritalstatus();
		this.gender = p.getGender();
	}
	
	public void update(User user){
		user.setLastName(lastName);
		user.setName(name);
		
		Profile p = user.getProfile();
		p.setGender(gender);
		p.setMaritalstatus(maritalStatus);
		p.setBirthdate(birthdate);
	}

	public Date getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}

	public MaritalStatus getMaritalStatus() {
		return maritalStatus;
	}

	public void setMaritalStatus(MaritalStatus maritalStatus) {
		this.maritalStatus = maritalStatus;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public Gender getGender() {
		return gender;
	}

	public void setGender(Gender gender) {
		this.gender = gender;
	}
	
	
}